package dptest;

public class t509 {

	public static void main(String[] args) {
		int n = 5;
		if(n ==0) {
			//System.out.println(0);
			//return 0;
		}
		if(n == 1) {
			//System.out.println(1);
		}
		int dp [] = new int [3];
		dp[0] = 0;
		dp[1] = 1;
		
		for(int i = 2; i <=n ; i++) {
			dp[i%3] = dp[(i-1)%3]+dp[(i-2)%3];
		}
		System.out.println(dp[n%3]);
		//return dp[n];

	}

}
